package eu.expressis.eiaf.web.presentation.vaadin;

import com.vaadin.ui.Button;

public class HelloButton extends Button {

  public HelloButton(final HelloService helloService) {
    super("Click me!");

    addListener(new ClickListener() {
      public void buttonClick(ClickEvent event) {
        EciApplication application = (EciApplication) getApplication();
        String helloText = application.getHelloService().getHelloText();
        application.getMainWindow().showNotification(helloText);
      }
    });
  }
}
